package cn.htu.javaSong.controller;


import cn.htu.javaSong.common.ResponseModel;
import cn.htu.javaSong.service.IVideoService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author dakai
 * @since 2024-10-26
 */
@RestController
@RequestMapping("/video")
public class VideoController {

    @Resource
    private IVideoService iVideoService;

    @PostMapping("/uploadMp4")
    public ResponseModel uploadVideoFile(@RequestParam("file") MultipartFile file) {
        return iVideoService.addVideo(file);
    }
}
